package util;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class NowTime {
    protected String time;
    public NowTime() {
    }
    public NowTime(String time) {
        this.time = time;
    }
    /**
     * 获取
     *
     * @return time
     */
    public String getTime() {
        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        time = LocalDateTime.now().format(df);
        return time;
    }

}
